#include<iostream>
#include<vector>
using namespace std;
//1.模拟循环队列
class MyCircularQueue
{
public:
    MyCircularQueue(int k)
    {
        head = tail = 0;
        this->capacity = k + 1;
        this->v = vector<int>(capacity);
    }
    bool enQueue(int value)
    {
        if (isFull())
            return false;
        v[tail] = value;
        tail = (tail + 1) % capacity;
        return true;
    }
    bool deQueue()
    {
        if (isEmpty())
            return false;
        head = (head + 1) % capacity;
        return true;
    }
    int Front()
    {
        if (isEmpty())
            return -1;
        return v[head];
    }
    int Rear()
    {
        if (isEmpty())
            return -1;
        return v[(tail - 1 + capacity) % capacity];
    }
    bool isEmpty()
    {
        return head == tail;
    }
    bool isFull()
    {
        return ((tail + 1) % capacity) == head;
    }
private:
    int head;
    int tail;
    int capacity;
    vector<int> v;
};
int main()
{
	return 0;
}